[NTG-context] Re: tiffs: autoconversion via graphicsmagick produces invalid pdfs

2023-09-13 Thread denis.maier
rters.tif.default = convert \stopluacode \setfigureconversion[tif][jpg] % has no effect \defineexternalfigure[tif][conversion=jpg] \starttexdefinition includegraphics #1 \splitfilename{#1} \processaction[\splitofftype][ tif=>{\externalfigure[#1][tif]}, default=>{\externa

[NTG-context] Experiments with \doloopoverlist

2023-08-16 Thread Andres Conrado Montoya
inlineuserdata? %% MWE: \setupinteraction[state=start] \define[2]\imghref{\bgroup\goto{#1}[url(#2)]\egroup} \defineexternalfigure[logo][height=1em] \definedataset[autores] \setdataset[autores][ nombre={Angie Natalia Farfán Acevedo}, cvlac={ https://scienti.minciencias.gov.co/cvlac/visualizador

[NTG-context] TIL: figure combinations

2022-08-11 Thread Henning Hraban Ramm via ntg-context
=\measure{combination}]}{mill} {\externalfigure[hacker][width=\measure{combination}]}{hacker} \stopcombination But that’s still tedious. With the power of \defineexternalfigure: \defineexternalfigure[combination][width=\measure{combination}] (That’s predefined, no need to copy!) \startcombination[3

Re: [NTG-context] Set up external figure for particular image type

2022-08-01 Thread Hans Hagen via ntg-context
On 8/1/2022 2:29 AM, Thangalin via ntg-context wrote: Got it working. Complete solution: |\setupexternalfigures[ location={local,global,default}, width=\textwidth ] \defineexternalfigure[svg][width=1cm] \defineexternalfigure[jpg][width=2cm] \defineexternalfigure[png][width=4cm] % Won't

Re: [NTG-context] Set up external figure for particular image type

2022-08-01 Thread Thangalin via ntg-context
Got it working. Complete solution: \setupexternalfigures[ location={local,global,default}, width=\textwidth ]\defineexternalfigure[svg][width=1cm]\defineexternalfigure[jpg][width=2cm]\defineexternalfigure[png][width=4cm] % Won't be applied because there's no process action.% Default

Re: [NTG-context] Set up external figure for particular image type

2022-07-18 Thread Wolfgang Schuster via ntg-context
ich was used in my example to pass the default values with \defineexternalfigure. Just using \externalfigure[#1][conversion=mp] where you pass the default values with the second argument is enough. Wolfgang ___ If y

Re: [NTG-context] Set up external figure for particular image type

2022-07-18 Thread Thangalin via ntg-context
ain! > \setupexternalfigures [location={local,global,default}] > > \defineexternalfigure [jpg] [width=4cm] > \defineexternalfigure [png] [width=8cm] > > \starttexdefinition includegraphics #1 > > \splitfilename{#1} > > \processaction > [\splitofftype] >

Re: [NTG-context] Set up external figure for particular image type

2022-07-18 Thread Thangalin via ntg-context
the > file name extension (and header within the file). > > One possibility would be something like: > > \setupexternalfigure[ > width=1em, > height=1em, > order={svg,pdf,png,jpg}, > location={local,default,global}, > ] > \defineexternalfigure[p

Re: [NTG-context] Set up external figure for particular image type

2022-07-12 Thread Rik Kabel via ntg-context
}, ] \defineexternalfigure[png][ width=\textwidth, height=\textheight, ] \unprotect \let\old_externalfigure=\externalfigure \tolerant\def\externalfigure[#1]#,[#2]#,[#3]{% \doifelseinstring{.png}{#1}{% \old_externalfigure[#1][png][#2]% }{% \doifelsefileexists{#1.png}{% \old_externalfigure[#1.png][png

Re: [NTG-context] Set up external figure for particular image type

2022-07-12 Thread Wolfgang Schuster via ntg-context
}, ] \defineexternalfigure[png][ width=\textwidth, height=\textheight, ] \unprotect \let\old_externalfigure=\externalfigure \tolerant\def\externalfigure[#1]#,[#2]#,[#3]{% \doifelseinstring{.png}{#1}{% \old_externalfigure[#1][png][#2]% }{% \doifelsefileexists{#1.png}{% \old_externalfigure[#1.png

Re: [NTG-context] Set up external figure for particular image type

2022-07-12 Thread Thangalin via ntg-context
way. The only part that differs is the file name extension (and header within the file). One possibility would be something like: \setupexternalfigure[ width=1em, height=1em, order={svg,pdf,png,jpg}, location={local,default,global}, ] \defineexternalfigure[png][ width=\textwidth

Re: [NTG-context] Set up external figure for particular image type

2022-07-08 Thread Henning Hraban Ramm via ntg-context
Am 08.07.22 um 17:46 schrieb Thangalin via ntg-context: I'd like to change the `maxheight` option for only PNG images, such as: Define your own figure class with \definexternalfigure: https://wiki.contextgarden.net/Command/defineexternalfigure It won’t automatically chose the file format

Re: [NTG-context] \externafigure and \at do not work together

2021-11-01 Thread Wolfgang Schuster via ntg-context
}] \defineexternalfigure[rotated][orientation=90] \starttext \externalfigure[hacker.jpg][rotated] \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context

Re: [NTG-context] \startplacefigure and \startframedtext in lmtx

2020-06-10 Thread mf
] \defineexternalfigure[dummy] \starttext \startplacefigure[location=left,number=no,title={}] \externalfigure[dummy][width=.45\textwidth] \stopplacefigure \dontleavehmode % if this is commented out then the text and the figure are placed on top of each other \startframedtext[frame=off] \input

Re: [NTG-context] \startplacefigure and \startframedtext in lmtx

2020-06-10 Thread Wolfgang Schuster
] \defineexternalfigure[dummy] \starttext \startplacefigure[location=left,number=no,title={}] \externalfigure[dummy][width=.45\textwidth] \stopplacefigure \dontleavehmode % if this is commented out then the text and the figure are placed on top of each other \startframedtext[frame=off] \input

Re: [NTG-context] \startplacefigure and \startframedtext in lmtx

2020-06-10 Thread Hans Hagen
the issue, but since in my document I have a certain number of cases where such combinations are used, I woul dlike to be sure to not make a mistake by changing all the instances… Here is an example: %% begin figure-framedtext.tex \useMPlibrary[dum] \defineexternalfigure[dummy] \starttext

Re: [NTG-context] \startplacefigure and \startframedtext in lmtx

2020-06-10 Thread Otared Kavian
und the issue, but since in my document I have a certain > number of cases where such combinations are used, I woul dlike to be sure to > not make a mistake by changing all the instances… Here is an example: > > %% begin figure-framedtext.tex > \useMPlibrary[dum] > \defineexternalfi

[NTG-context] \startplacefigure and \startframedtext in lmtx

2020-06-09 Thread Otared Kavian
a certain number of cases where such combinations are used, I woul dlike to be sure to not make a mistake by changing all the instances… Here is an example: %% begin figure-framedtext.tex \useMPlibrary[dum] \defineexternalfigure[dummy] \starttext \startplacefigure[location=left,number=no,title

Re: [NTG-context] Some questions about an extreme table

2018-08-26 Thread Fabrice Couvreur
control the vertical alignment with a few box commands but what > you > > should use depends on the context, in tables I would use 2 while in > running > > text 3 can be better. Which alignment you’re using is your choice. > > > > > > \useMPlibrary[dum] > > >

Re: [NTG-context] Some questions about an extreme table

2018-08-26 Thread Aditya Mahajan
be better. Which alignment you’re using is your choice. \useMPlibrary[dum] \defineexternalfigure[dummy][width=4cm,height=3cm] \setuplayout[grid=yes] \showgrid \starttext Default: \externalfigure[dummy] %1: \bottomrightbox{\externalfigure[dummy]}\quad 1: \aligned[bottom,right

Re: [NTG-context] Some questions about an extreme table

2018-08-26 Thread Wolfgang Schuster
choice. \useMPlibrary[dum] \defineexternalfigure[dummy][width=4cm,height=3cm] \setuplayout[grid=yes] \showgrid \starttext Default: \externalfigure[dummy] %1: \bottomrightbox{\externalfigure[dummy]}\quad 1: \aligned[bottom,right]{\externalfigure[dummy]}\quad 2: \tbox{\externalfigure[dummy

Re: [NTG-context] \completeindex and \setuparranging

2018-03-20 Thread Wolfgang Schuster
t work because you have no paragraphs in your document. When you add \dontleavehmode before each \externalfigure the entries are correct. \setupwhitespace[line] \defineexternalfigure[score][width=\textwidth] \starttext \dontleavehmode\externalfigure[Alaude][score]\index{Alaude} \dontleav

Re: [NTG-context] minor bugfix

2017-09-27 Thread Pablo Rodriguez
externalfigure[delta] \par +% 4cm breed: \externalfigure[beta] [width=4cm] \par +% 5cm breed: \externalfigure[gamma][width=5cm] \par % % \defineexternalfigure[a][width=10cm] % \defineexternalfigure[b][width=5cm]

Re: [NTG-context] bug in image scaling

2016-07-10 Thread Pablo Rodriguez
>> \stoptext >> >> Using latest beta from 2016.07.08 17:19, scaling doesn’t work. > > next beta: > > \setupexternalfigure[location=default] > \defineexternalfigure[foo][width=.5\textwidth] > > \starttext \showframe > > \insertpages[cow.pdf][c

Re: [NTG-context] bug in image scaling

2016-07-10 Thread Hans Hagen
: \setupexternalfigure[location=default] \defineexternalfigure[foo][width=.5\textwidth] \starttext \showframe \insertpages[cow.pdf][category=foo] \stoptext (you wikify it) - Hans Hagen | PRAGMA ADE

Re: [NTG-context] external figure sizing

2015-05-09 Thread Hans Hagen
by height and vice versa. Defining both width and height results in exact resizing and the aspect ratio is not maintained. How can this be solved? \useMPlibrary[dum] \showframe \starttext \setuplayout[middle] \defineexternalfigure[quarter][factor=max] \vbox{\dorecurse{4}{\hbox{\hsize.25

[NTG-context] Help with \numexpr

2015-05-04 Thread Keith McKay
is the code \setupexternalfigures [directory={/Path/to/the/Photos}] \defineexternalfigure[photo][maxheight=0.4\textheight] \define \numberText{1} \starttext \dostepwiserecurse{141}{146}{1}/% //\recurselevel is part of photo filename. See below./ { \externalfigure[sam_0\recurselevel.jpg

Re: [NTG-context] Help with \numexpr

2015-05-04 Thread Hans Hagen
suggestions would be helpfull. Here is the code \setupexternalfigures [directory={/Path/to/the/Photos}] \defineexternalfigure[photo][maxheight=0.4\textheight] \define \numberText{1} \starttext \dostepwiserecurse{141}{146}{1}/% //\recurselevel is part of photo filename. See below

Re: [NTG-context] Help with \numexpr

2015-05-04 Thread Keith McKay
={/Path/to/the/Photos}] \defineexternalfigure[photo][maxheight=0.4\textheight] \define \numberText{1} \starttext \dostepwiserecurse{141}{146}{1}/% //\recurselevel is part of photo filename. See below./ { \externalfigure[sam_0\recurselevel.jpg][photo] \par /% //\recurselevel is part of photo filename

Re: [NTG-context] How does \setupfloat work?

2014-11-29 Thread Christoph Reller
in \setupfloat[figure] doesn't work. Am I reading the manual wrong, or is is just not implemented yet or something? (honest question) Thanks for your response, Mark Hi Mark, You can use \defineexternalfigure as in the following example. \defineexternalfigure[whatever][width=2cm] \starttext \placefigure

Re: [NTG-context] How does \setupfloat work?

2014-11-29 Thread Mark Szepieniec
macros or something to solve this, but I'm just puzzled that setting width in \setupfloat[figure] doesn't work. Am I reading the manual wrong, or is is just not implemented yet or something? (honest question) Thanks for your response, Mark Hi Mark, You can use \defineexternalfigure

[NTG-context] Image width in a two-column layout

2013-09-02 Thread Thangalin
\stoptext Actual results: the image appears as undefined. Expected results: the image appears, stretched to fill the column. Work around 1: use wfactor. Work around 2: \defineexternalfigure[fullwidth][factor=fit] and then use \externalfigure[file.jpg][fullwidth] Kind regards

Re: [NTG-context] External figures from other folders

2013-02-05 Thread Hans Hagen
or environment: \defineexternalfigure[sizeone][width=5cm] \defineexternalfigure[sizetwo][height=4cm] (these can also inherit: \definexternalfigure[a][b][frame=on]) In the document source: \externalfigure[cow][sizeone] \externalfigure[cow][sizetwo][frame=on] A way to get consistent scaling

[NTG-context] Bug in \externalfigure[...][factor=max]

2013-02-02 Thread Aditya Mahajan
\externalfigure[cow][ratio][factor=max] \NC \NR \NC fit \NC \externalfigure[cow][ratio][factor=fit] \NC \NR \stopTABLE \stopbuffer \starttext \subject {Width Height} \defineexternalfigure[ratio][height=1cm,width=5cm] \getbuffer \subject {Height Width} \defineexternalfigure[ratio][width=1cm,height

[NTG-context] Odd /externalfigure behavior

2012-12-12 Thread Guy Stalnaker
markdown doc and regenerate the context document the issue persists with or without subsequent edit!! Damned peculiar. Here's the workflow: pandoc -s -f markdown -t context file.md -o file.context.tex gedit file.context.tex to add: \defineexternalfigure[screenshot][frame=on] and then add

Re: [NTG-context] Odd /externalfigure behavior

2012-12-12 Thread Wolfgang Schuster
file.context.tex to add: \defineexternalfigure[screenshot][frame=on] and then add [screenshot] to all of the \externalfigure directives. Then find the /crlf that appear immediate before *all* of the \externalfigure directives and double them (unless someone who reads this can tell me how to easily

[NTG-context] Images in MultiMarkdown - context - PDF

2012-11-20 Thread Guy Stalnaker
on that pandoc output. I have edited the context file to include a /defineexternalfigure directive to put a frame around all images. The images I have are all screenshots of application usage steps. The crucial output is html that goes into our online Knowledge base. Secondary output is PDF

Re: [NTG-context] scale=... and specifying the width and height of a figure

2012-10-16 Thread Hans Hagen
if this should be classified as a bug, but I am posting it here in case anyone else encounters the same issue and needs to know how to override this behavior: \externalfigure[cow][width=1cm, height=3cm, scale=] if needed you can use an abstraction: \starttext \defineexternalfigure[whatever

Re: [NTG-context] scale=... and specifying the width and height of a figure

2012-10-16 Thread Aditya Mahajan
: \starttext \defineexternalfigure[whatever][width=3cm,height=4cm] \defineexternalfigure[another] [scale=500] \externalfigure[cow] \externalfigure[cow][whatever] \externalfigure[cow][another] \stoptext I actually use these abstractions, but with the default value also set. That's the whole point

Re: [NTG-context] scale=... and specifying the width and height of a figure

2012-10-16 Thread Hans Hagen
] \defineexternalfigure[grid] [width=0.55\paperwidth, height=0.33\paperwidth, scale=, factor=] Around five months ago, I did not need to reset scale and factor. The code now uses the new inheritance mechamisn and in mkii external figures had a whole bunch of (sometimes tricky) resets. Some were

Re: [NTG-context] scale=... and specifying the width and height of a figure

2012-10-16 Thread Aditya Mahajan
=\textwidth, maxheight=\textheight] \defineexternalfigure[grid] [width=0.55\paperwidth, height=0.33\paperwidth, scale=, factor=] Around five months ago, I did not need to reset scale and factor. The code now uses the new inheritance mechamisn and in mkii external figures had a whole bunch

[NTG-context] external figures

2012-07-20 Thread Hans Hagen
Hi, In the next beta \definexternalfigure is chained. \starttext \defineexternalfigure[test][width=2cm] \defineexternalfigure[less][test][width=3cm,background=color,backgroundcolor=green] \setupexternalfigure [less][height=.5cm] \externalfigure[cow.pdf][test] \par \externalfigure[cow.pdf

Re: [NTG-context] Graphics in text-line

2011-11-27 Thread Wolfgang Schuster
control about the height gives you this method: \defineexternalfigure[inline][height=1.8ex] \starttext This is a cow \externalfigure[cow][inline]. \stoptext Wolfgang ___ If your question is of interest to others

Re: [NTG-context] Graphics in text-line

2011-11-27 Thread Robert Blackstone
More control about the height gives you this method: \defineexternalfigure[inline][height=1.8ex] \starttext This is a cow \externalfigure[cow][inline]. \stoptext Wolfgang This, especially the second method, is exactly what I wanted. Thank you very much Wolfgang. Best regards, Robert

Re: [NTG-context] Graphics in text-line

2011-11-27 Thread Wolfgang Schuster
control about the height gives you this method: \defineexternalfigure[inline][height=1.8ex] \starttext This is a cow \externalfigure[cow][inline]. \stoptext Wolfgang ___ If your question is of interest to others

Re: [NTG-context] floatrow

2010-02-09 Thread Hans Hagen
On 8-2-2010 23:18, Bernhard Rosensteiner wrote: Am 08.02.2010 um 23:07 schrieb Hans Hagen: On 8-2-2010 22:16, Bernhard Rosensteiner wrote: Am 08.02.2010 um 19:42 schrieb Hans Hagen: On 8-2-2010 18:52, Bernhard Rosensteiner wrote: thanks for the hint with \defineexternalfigure… - indeed

Re: [NTG-context] floatrow

2010-02-08 Thread Hans Hagen
- the outcome of the height is so not really predictable) normally one will have categories of graphics, so you can do things like (one of the oldest mechanisms) \starttext \defineexternalfigure[whatever][height=3cm] \startcombination {\externalfigure[cow.pdf] [whatever

Re: [NTG-context] floatrow

2010-02-08 Thread Hans Hagen
On 8-2-2010 22:16, Bernhard Rosensteiner wrote: Am 08.02.2010 um 19:42 schrieb Hans Hagen: On 8-2-2010 18:52, Bernhard Rosensteiner wrote: thanks for the hint with \defineexternalfigure… - indeed useful. The „automatic“ feature of floatrow is nice but not so important that i will ever

Re: [NTG-context] Labelling figures

2008-09-17 Thread Hans Hagen
=2cm] \defineexternalfigure[whatever][background={foreground,figure}] \startsetups figure \setlayerframed[figure][preset=righttop,x=.25\layerwidth,y=.25\layerheight]{\red MORE} \setlayerframed[figure][preset=middle,foregroundcolor=green]{EVEN MORE} \stopsetups

Re: [NTG-context] ConTeXt-ifying Kile

2008-01-02 Thread Matija Šuklje
] \definedescription[name][settings] # \definedfont \defineenumeration[names][name][settings] # \defineexternalfigure \definefield[reference][widget type][setup name][names][initial content] \definefieldstack[name][names][settings] \definefiguresymbol[name][text][settings] \definefloat[singular

Re: [NTG-context] Snapping sectionhead

2006-08-15 Thread Hans Hagen
=grid,inbetween=] \defineexternalfigure[enkel] [width=10cm,frame=on,grid=depth] \defineexternalfigure[dubbel][width=10cm,frame=on,grid=depth] \starttext test \placefigure{} {\externalfigure[t:/sources/cow.pdf][frame=on,grid=yes]} test \page test \placefigure{\input zapf\relax

Re: [NTG-context] Re: error with _ in header?

2004-08-19 Thread Hans Hagen
of moments of expansion fix (in core-fig.tex:) \def\dodoplaceexternalfigure[#1][#2][#3][#4][#5][#6]% {\doifsomething{#3}% catches \defineexternalfigure dummies {\bgroup \pushmacro\textunderscore \edef\textunderscore{\string_}% brrr, temp hack, still needed? \calculateexternalfigure